<script>



function Car(name,price){
  this.name=name;
  this.price=price; 
  if(typeof Car.sell=="undefined"){
   Car.prototype.sell=function(){
    alert("我是"+this.name+"，我现在卖"+this.price+"万元");
   }
 Car.sell=true;
  }
}
 
var camry =new Car("凯美瑞",27);
camry.sell()



</script>